package cn.sofwin.day0105homework;

import java.util.Scanner;

public class luck {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int i,j,k,l,number,sum;

        System.out.println("请输入卡号后四位");
        number = sc.nextInt();
        i = number%10;
        j = number/10%10;
        k = number/100%10;
        l = number/1000;
        sum=i+j+k+l;
        boolean a=(sum>20);
        System.out.println("会员卡号" + number +"各位数之和为" + sum);
        System.out.println("是否为幸运用户" + a);


    }
}
